{layout name="public/layout" /}
{include file='yxnavbar'}


<div class="main">
    {include file='../../plugin/weike/template/web/common_nav'}
    <div class="panel panel-info">
        <div class="panel-heading">总数量：<span style="color: red">{$page_total}</span> </div>
        <div class="panel-body">
            <form id="myform" action="./index.php" method="get" class="form-horizontal" role="form">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="{$_P['m']}" />
                <input type="hidden" name="do" value="web" />
                <input type="hidden" name="r" value="weike.index.collectinfolist" id="r" />
                <div class="form-group">
                    {if count($themelist)>1 }
                    <div class="col-xs-12 col-sm-2 col-md-2">
                        <select onchange="submitForm();" class="form-control" name="themeid">
                            {loop $themelist $row}
                            <option value="{$row['id']}" {if $themeid == $row['id'] } selected="selected" {/if}>{$row['id']} - {php echo mb_substr($row['title'],0,8,'utf-8');}</option>
                            {/loop}
                        </select>
                    </div>
                    {else}
                     <input type="hidden" name="themeid" value="{$themeid}" />
                    {/if}
                </div>

                <div class="form-group clearfix">
                    <label class="col-xs-12 col-sm-3 col-md-1 control-label">关键字</label>
                    <div class="col-sm-4 col-xs-4 col-md-4">
                        <input class="form-control" name="search_data" placeholder="输入姓名" type="text" value="{$_P['search_data']}">
                    </div>
                    <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6">
                        <button class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button>
                        <input type="hidden" name="__token__" value="{$Request.token}"/>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <div class="tab-content">
        <div class="panel panel-default">
            <div class="panel-body table-responsive">
                <table class="table table-hover">
                    <thead class="navbar-inner">
                        <tr>
                            <th style="width: 100px">客户姓名</th>
                            <th style="width: 160px">好友头像/昵称</th>
                            <th style="width: 100px">好友姓名</th>
                            <th style="width: 100px">好友手机号</th>
                            <th style="width: 160px">好友填写信息时间</th>
                            <th style="width: 100px">收集信息方式</th>
                        </tr>
                    </thead>
                    <tbody>
                    {loop $list $index $item}
                        <tr>
                            <td>{$item['name']}</td>
                            <td>
                                <img src="{php echo tomedia($item['avatar']);}" width="28" style="border-radius: 3px;"><br>
                                {$item['nickname']}
                            </td>
                            <td>{$item['username']}</td>
                            <td>
                                {php echo $item['mobile'];}
                            </td>
                            <td>
                                {$item['created_at']}
                            </td>
                            <td>
                                {if $item['type'] == 'call'}
                                打call收集
                                {elseif $item['type'] == 'gift'}
                                打赏礼物收集
                                {else}
                                未知
                                {/if}
                            </td>
                        </tr>
                    {/loop}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

{$pager}
<script type="text/javascript">
    $(document).ready(
        function (){
            console.log('js代码');
        }
    );
    function submitForm(){
        $("#r").val('weike.index.collectinfolist');
        var form = document.getElementById("myform");
        form.submit();
    }
</script>
